; The CMD file.
;==========================================================================

[Command]
name = "CPU1"
command = a, a, a
time = 1

[Command]
name = "CPU2"
command = b, b, b
time = 1

[Command]
name = "CPU3"
command = c, c, c
time = 1

[Command]
name = "CPU4"
command = x, x, x
time = 1

[Command]
name = "CPU5"
command = y, y, y
time = 1

[Command]
name = "CPU6"
command = z, z, z
time = 1

[Command]
name = "CPU7"
command = a, b, c
time = 1

[Command]
name = "CPU8"
command = a, c, b
time = 1

[Command]
name = "CPU9"
command = b, a, c
time = 1

[Command]
name = "CPU10"
command = b, c, a
time = 1

[Command]
name = "CPU11"
command = c, b, a
time = 1

[Command]
name = "CPU12"
command = c, a, b
time = 1

[Command]
name = "CPU13"
command = x, y, z
time = 1

[Command]
name = "CPU14"
command = x, z, y
time = 1

[Command]
name = "CPU15"
command = y, z, x
time = 1

[Command]
name = "CPU16"
command = y, x, z
time = 1

[Command]
name = "CPU17"
command = z, y, x
time = 1

[Command]
name = "CPU18"
command = z, x, y
time = 1

[Command]
name = "CPU19"
command = a, b, a
time = 1

[Command]
name = "CPU20"
command = a, c, a
time = 1

[Command]
name = "CPU21"
command = b, a, b
time = 1

[Command]
name = "CPU22"
command = b, c, b
time = 1

[Command]
name = "CPU23"
command = c, a, c
time = 1

[Command]
name = "CPU24"
command = c, b, c
time = 1

[Command]
name = "CPU25"
command = x, y, x
time = 1

[Command]
name = "CPU26"
command = x, z, x
time = 1

[Command]
name = "CPU27"
command = y, x, y
time = 1

[Command]
name = "CPU28"
command = y, z, y
time = 1

[Command]
name = "CPU29"
command = z, x, z
time = 1

[Command]
name = "CPU30"
command = z, y, z
time = 1

;-| Super Moves |--------------------------------------------------------
[Command]
name = "upper_pp"
command = ~F, D, DF, x+y

[Command]
name = "upper_pp"
command = ~F, D, DF, y+z

[Command]
name = "upper_pp"
command = ~F, D, DF, x+z
 
[Command]
name = "QCF_pp"
command = ~D, F, x+y

[Command]
name = "QCF_pp"
command = ~D, F, y+z

[Command]
name = "QCF_pp"
command = ~D, F, x+z

[Command]
name = "QCF_kk"
command = ~D, F, a+b

[Command]
name = "QCF_kk"
command = ~D, F, b+c

[Command]
name = "QCF_kk"
command = ~D, F, a+c

[Command]
name = "QCB_kk"
command = ~D, B, a+b

[Command]
name = "QCB_kk"
command = ~D, B, b+c

[Command]
name = "QCB_kk"
command = ~D, B, a+c

;-| Special Moves |------------------------------------------------------
[Command]
name = "upper_x"
command = ~F, D, DF, x

[Command]
name = "upper_y"
command = ~F, D, DF, y

[Command]
name = "upper_z"
command = ~F, D, DF, z

[Command]
name = "Boomerang_throw"
command = ~D, DF, F, c

[Command]
name = "QCF_k"
command = ~D, F, a

[Command]
name = "QCF_k"
command = ~D, F, b

[Command]
name = "QCF_k"
command = ~D, F, c

[Command]
name = "QCB_k1"
command = ~D, B, a

[Command]
name = "QCB_k2"
command = ~D, B, b

[Command]
name = "QCB_k3"
command = ~D, B, c

[Command]
name = "QCB_p1"
command = ~D, B, x

[Command]
name = "QCB_p2"
command = ~D, B, y

[Command]
name = "QCF_p1"
command = ~D, F, x

[Command]
name = "QCF_p2"
command = ~D, F, y

[Command]
name = "QCF_p3"
command = ~D, F, z

[Command]
name = "QCF_p"
command = ~D, F, x

[Command]
name = "QCF_p"
command = ~D, F, y

[Command]
name = "QCF_p"
command = ~D, F, z

[Command]
name = "roll"
command = ~B, D, x

[Command]
name = "roll"
command = ~B, D, y

[Command]
name = "roll"
command = ~B, D, z

[Command]
name = "roll"
command = ~B, D, a

[Command]
name = "roll"
command = ~B, D, b

[Command]
name = "roll"
command = ~B, D, c

[Command]
name = "counter"
command = ~B, D, c

[Command]
name = "Super_Jump"
command = $D, $U

;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery";Required (do not remove)
command = x+y
time = 1


;-| push back |-----------------------------------------------------------
[command]
name = "pushblock"
command = x+y
time = 10

[command]
name = "pushblock"
command = x+z
time = 10

[command]
name = "pushblock"
command = z+y
time = 10

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

[Command]
name = "down_b"
command = /$D,b
time = 1

;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

[Command]
name = "b"
command = b
time = 1

[Command]
name = "c"
command = c
time = 1

[Command]
name = "x"
command = x
time = 1

[Command]
name = "y"
command = y
time = 1

[Command]
name = "z"
command = z
time = 1

[Command]
name = "start"
command = s
time = 1

[Command]
name = "hold_a"
command = /$a
time = 1

[Command]
name = "hold_b"
command = /$b
time = 1

[Command]
name = "hold_c"
command = /$c
time = 1

[Command]
name = "hold_x"
command = /$x
time = 1

[Command]
name = "hold_y"
command = /$y
time = 1

[Command]
name = "hold_z"
command = /$z
time = 1

[Command]
name = "release_z"
command = ~z
time = 1

;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1

[Command]
name = "holdup" ;Required (do not remove)
command = /$U
time = 10

[Command]
name = "holddown"
command = /$D
time = 1



;---------------------------------------------------------------------------
; 2. State entry
[Statedef -1]

;===========================================================================
;---------------------------------------------------------------------------

;Vaporeon Hydro Pump state
;If var(25) (the timer var) is above 0 then his Vaporeon Hydro Pump hit is active
;Let this be the first statedef in your command file to ensure that it get's checked before all the other's
[State -1, VaporeonHydroPumpState]
type = ChangeState
value = 1036
triggerall = var(25) > 0 && statetype != A && ctrl
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
trigger4 = command = "a"
trigger5 = command = "b"
trigger6 = command = "c"

;To insure that no other attack happens while the Vaporeon Hydro Pump hyper is activated
;we must add this statement to the triggerall portion of every attack

;triggerall = var(25) <= 0

;If our timer variable = 0 or is below zero the Vaporeon Hydro Pump hyper is no longer active


;Armored Mewtwo
[State -1, Armored Mewtwo]
type = ChangeState
value = 1040
triggerall = command = "QCF_kk" && command != "holddown" && power >= 1000 ;&& var(25) <= 0
trigger1 = ctrl &&  statetype != A
trigger2 = stateno = 200 &&  AnimElem = 2, >= 0
trigger3 = stateno = 205 &&  AnimElem = 4, >= 0
trigger4 = stateno = 215 &&  AnimElem = 2, >= 0
trigger5 = stateno = 220 &&  AnimElem = 3, >= 0
trigger6 = stateno = 225 &&  AnimElem = 6, >= 0
trigger7 = stateno = 300 &&  AnimElem = 2, >= 0
trigger8 = stateno = 305 &&  AnimElem = 4, >= 0
trigger9 = stateno = 315 &&  AnimElem = 2, >= 0
trigger10 = stateno = 320 && AnimElem = 3, >= 0
trigger11 = stateno = 325 && AnimElem = 4, >= 0
;---------------------------------------------------------------------------
;Vaporeon Hydro Pump Start
[State -1, Vaporeon Hydro Pump Start Activate]
type = ChangeState
value = 1035 ;1030
triggerall = command = "QCB_kk" && command != "holddown" && power >= 1000 ;&& var(25) <= 0
trigger1 = ctrl &&  statetype != A
trigger2 = stateno = 200 &&  AnimElem = 2, >= 0
trigger3 = stateno = 205 &&  AnimElem = 4, >= 0
trigger4 = stateno = 215 &&  AnimElem = 2, >= 0
trigger5 = stateno = 220 &&  AnimElem = 3, >= 0
trigger6 = stateno = 225 &&  AnimElem = 6, >= 0
trigger7 = stateno = 300 &&  AnimElem = 2, >= 0
trigger8 = stateno = 305 &&  AnimElem = 4, >= 0
trigger9 = stateno = 315 &&  AnimElem = 2, >= 0
trigger10 = stateno = 320 && AnimElem = 3, >= 0
trigger11 = stateno = 325 && AnimElem = 4, >= 0
trigger12 = stateno = 400 && MoveContact
trigger13 = stateno = 405 && MoveContact
trigger14 = stateno = 415 && MoveContact
trigger15 = stateno = 420 && MoveContact
trigger16 = stateno = 411 && time >= 13
;---------------------------------------------------------------------------
;Mega Eevee Attack
[State -1, Mega Eevee Attack Hyper]
type = ChangeState
value = 1000
triggerall = command = "QCF_pp" && command != "holddown" && power >= 1000 ;&& var(25) <= 0
trigger1 = ctrl &&  statetype != A
trigger2 = stateno = 200 &&  AnimElem = 2, >= 0
trigger3 = stateno = 205 &&  AnimElem = 4, >= 0
trigger4 = stateno = 215 &&  AnimElem = 2, >= 0
trigger5 = stateno = 220 &&  AnimElem = 3, >= 0
trigger6 = stateno = 225 &&  AnimElem = 6, >= 0
trigger7 = stateno = 300 &&  AnimElem = 2, >= 0
trigger8 = stateno = 305 &&  AnimElem = 4, >= 0
trigger9 = stateno = 315 &&  AnimElem = 2, >= 0
trigger10 = stateno = 320 && AnimElem = 3, >= 0
trigger11 = stateno = 325 && AnimElem = 4, >= 0
trigger12 = stateno = 400 && MoveContact
trigger13 = stateno = 405 && MoveContact
trigger14 = stateno = 415 && MoveContact
trigger15 = stateno = 420 && MoveContact
trigger16 = stateno = 411 && time >= 13
;---------------------------------------------------------------------------
;Jolteon Rush Hit
[State -1, Jolteon Rush Hit]
type = ChangeState
value = 2500
triggerall= command = "QCB_p2"
triggerall= numproj = 0 ;&& var(25) <= 0
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger1 = Time%2 = 0
;---------------------------------------------------------------------------
;Leafeon Leaf Boomerang
[State -1, Leafeon Leaf Boomerang]
type = ChangeState
value = 8300
trigger1 = command = "Boomerang_throw"
trigger1 = FrontEdgeDist >= 15
trigger1 = statetype = S
trigger1 = ctrl = 1
;---------------------------------------------------------------------------
;Standing Umbreon Flipping Jump (weak)
[State -1, Standing Umbreon Flipping Jump Weak]
type = ChangeState
value = 530
triggerall = command = "upper_x" && command != "holddown" ;&& var(25) <= 0
trigger1 = statetype != A && ctrl
trigger2 = stateno = 200 &&  AnimElem = 2, >= 0
trigger3 = stateno = 205 &&  AnimElem = 4, >= 0
trigger4 = stateno = 215 &&  AnimElem = 2, >= 0
trigger5 = stateno = 220 &&  AnimElem = 3, >= 0
trigger6 = stateno = 225 &&  AnimElem = 6, >= 0
trigger7 = stateno = 300 &&  AnimElem = 2, >= 0
trigger8 = stateno = 305 &&  AnimElem = 4, >= 0
trigger9 = stateno = 315 &&  AnimElem = 2, >= 0
trigger10 = stateno = 320 && AnimElem = 3, >= 0
trigger11 = stateno = 325 && AnimElem = 4, >= 0
;---------------------------------------------------------------------------
;Standing Umbreon Flipping Jump (medium)
[State -1, Standing Umbreon Flipping Jump Medium]
type = ChangeState
value = 533
triggerall = command = "upper_y" && command != "holddown" ;&& var(25) <= 0
trigger1 = statetype != A && ctrl
trigger2 = stateno = 200 &&  AnimElem = 2, >= 0
trigger3 = stateno = 205 &&  AnimElem = 4, >= 0
trigger4 = stateno = 215 &&  AnimElem = 2, >= 0
trigger5 = stateno = 220 &&  AnimElem = 3, >= 0
trigger6 = stateno = 225 &&  AnimElem = 6, >= 0
trigger7 = stateno = 300 &&  AnimElem = 2, >= 0
trigger8 = stateno = 305 &&  AnimElem = 4, >= 0
trigger9 = stateno = 315 &&  AnimElem = 2, >= 0
trigger10 = stateno = 320 && AnimElem = 3, >= 0
trigger11 = stateno = 325 && AnimElem = 4, >= 0
;---------------------------------------------------------------------------
;Standing Umbreon Flipping Jump (hard)
[State -1, Standing Umbreon Flipping Jump Hard]
type = ChangeState
value = 535
triggerall = command = "upper_z" && command != "holddown" ;&& var(25) <= 0
trigger1 = statetype != A && ctrl
trigger2 = stateno = 200 &&  AnimElem = 2, >= 0
trigger3 = stateno = 205 &&  AnimElem = 4, >= 0
trigger4 = stateno = 215 &&  AnimElem = 2, >= 0
trigger5 = stateno = 220 &&  AnimElem = 3, >= 0
trigger6 = stateno = 225 &&  AnimElem = 6, >= 0
trigger7 = stateno = 300 &&  AnimElem = 2, >= 0
trigger8 = stateno = 305 &&  AnimElem = 4, >= 0
trigger9 = stateno = 315 &&  AnimElem = 2, >= 0
trigger10 = stateno = 320 && AnimElem = 3, >= 0
trigger11 = stateno = 325 && AnimElem = 4, >= 0
;---------------------------------------------------------------------------
;Jumping Umbreon Flipping Jump (weak)
[State -1, Jumping Umbreon Flipping Jump Light]
type = ChangeState
value = 560
triggerall = command = "upper_x" && command != "holddown" ;&& var(25) <= 0
trigger1 = statetype = A && ctrl
trigger2 = stateno = 400 && MoveContact
trigger3 = stateno = 405 && MoveContact
trigger4 = stateno = 415 && MoveContact
trigger5 = stateno = 420 && MoveContact
;---------------------------------------------------------------------------
;Jumping Umbreon Flipping Jump (medium)
[State -1, Jumping Umbreon Flipping Jump Medium]
type = ChangeState
value = 561
triggerall = command = "upper_y" && command != "holddown" ;&& var(25) <= 0
trigger1 = statetype = A && ctrl
trigger2 = stateno = 400 && MoveContact
trigger3 = stateno = 405 && MoveContact
trigger4 = stateno = 415 && MoveContact
trigger5 = stateno = 420 && MoveContact
;---------------------------------------------------------------------------
;Jumping Umbreon Flipping Jump (hard)
[State -1, Jumping Umbreon Flipping Jump Hard]
type = ChangeState
value = 562
triggerall = command = "upper_z" && command != "holddown" ;&& var(25) <= 0
trigger1 = statetype = A && ctrl
trigger2 = stateno = 400 && MoveContact
trigger3 = stateno = 405 && MoveContact
trigger4 = stateno = 415 && MoveContact
trigger5 = stateno = 420 && MoveContact
;---------------------------------------------------------------------------
;Launch Confusion while jumping
[State -1, Launch Confusion Jumping]
type = ChangeState
value = 511
triggerall = command = "QCF_p" && command != "holddown" && numhelper(505) = 1 && var(3) = 0 ;&& var(25) <= 0
trigger1 = statetype = A && ctrl
trigger2 = stateno = 400 && MoveContact
trigger3 = stateno = 405 && MoveContact
trigger4 = stateno = 415 && MoveContact
trigger5 = stateno = 420 && MoveContact
;---------------------------------------------------------------------------
;Launch Confusion while Standing
[State -1, Launch Confusion Standing]
type = ChangeState
value = 510
triggerall = command = "QCF_p" && command != "holddown" && numhelper(505) = 1 && var(3) = 0 ;&& var(25) <= 0
trigger1 = statetype = S && ctrl
trigger2 = stateno = 200 &&  AnimElem = 2, >= 0
trigger3 = stateno = 205 &&  AnimElem = 4, >= 0
trigger4 = stateno = 215 &&  AnimElem = 2, >= 0
trigger5 = stateno = 220 &&  AnimElem = 3, >= 0
trigger6 = stateno = 225 &&  AnimElem = 6, >= 0
trigger7 = stateno = 300 &&  AnimElem = 2, >= 0
trigger8 = stateno = 305 &&  AnimElem = 4, >= 0
trigger9 = stateno = 315 &&  AnimElem = 2, >= 0
trigger10 = stateno = 320 && AnimElem = 3, >= 0
trigger11 = stateno = 325 && AnimElem = 4, >= 0
;---------------------------------------------------------------------------
;Summon Confusion
[State -1, Summon Confusion]
type = ChangeState
value = 505
triggerall = command = "QCF_p" && command != "holddown" && numhelper(505) = 0 && var(4) = 2 ;&& var(25) <= 0
trigger1 = statetype = S && ctrl
trigger2 = stateno = 200 &&  AnimElem = 2, >= 0
trigger3 = stateno = 205 &&  AnimElem = 4, >= 0
trigger4 = stateno = 215 &&  AnimElem = 2, >= 0
trigger5 = stateno = 220 &&  AnimElem = 3, >= 0
trigger6 = stateno = 225 &&  AnimElem = 6, >= 0
trigger7 = stateno = 300 &&  AnimElem = 2, >= 0
trigger8 = stateno = 305 &&  AnimElem = 4, >= 0
trigger9 = stateno = 315 &&  AnimElem = 2, >= 0
trigger10 = stateno = 320 && AnimElem = 3, >= 0
trigger11 = stateno = 325 && AnimElem = 4, >= 0
;---------------------------------------------------------------------------

;Summon
[State -1, Summon]
type = ChangeState
value = 488
triggerall = command = "QCB_p1" && command != "holddown"
trigger1 = statetype = S && ctrl && numhelper(482) = 0  ;&& var(25) <= 0
trigger2 = stateno = 200 &&  AnimElem = 2, >= 0
trigger3 = stateno = 205 &&  AnimElem = 4, >= 0
trigger4 = stateno = 215 &&  AnimElem = 2, >= 0
trigger5 = stateno = 220 &&  AnimElem = 3, >= 0
trigger6 = stateno = 225 &&  AnimElem = 6, >= 0
trigger7 = stateno = 300 &&  AnimElem = 2, >= 0
trigger8 = stateno = 305 &&  AnimElem = 4, >= 0
trigger9 = stateno = 315 &&  AnimElem = 2, >= 0
trigger10 = stateno = 320 && AnimElem = 3, >= 0
trigger11 = stateno = 325 && AnimElem = 4, >= 0
;---------------------------------------------------------------------------
;Run Forward
[State -1, Run Forward]
type = ChangeState
value = 100
trigger1 = command = "FF" && statetype = S && ctrl && stateno != [100,105]
;---------------------------------------------------------------------------
;Run Back
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = command = "BB" && statetype = S && ctrl && stateno != [100,107]
;---------------------------------------------------------------------------
;PushBlock
[State -1, push block]
type = Changestate
value = 160
triggerall = command = "pushblock"
triggerall = statetype = S
trigger1 = stateno = [150,153]

[State -1, push block]
type = Changestate
value = 162
triggerall = command = "pushblock"
triggerall = statetype = A
trigger1 = stateno = [154,155]

[State -1, push block]
type = Changestate
value = 161
triggerall = command = "pushblock"
triggerall = statetype = C
trigger1 = stateno = [151,153]
;---------------------------------------------------------------------------
;Espeon Throw
[State -1, Espeon Throw]
type = ChangeState
value = 249
triggerall = command = "z" && statetype = S && ctrl && stateno != 100 ;&& var(25) <= 0
trigger1 = command = "holdfwd" && p2bodydist X < 7 && p2movetype != H
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger2 = command = "holdback" && p2bodydist X < 10 && p2movetype != H
trigger2 = (p2statetype = S) || (p2statetype = C)
;---------------------------------------------------------------------------
;Jolteon Standing
[State -1, Stand Light Punch]
type = Changestate
value = 223
triggerall = command = "x" ;&& var(25) <= 0
triggerall = command != "holddown"
trigger1 = ctrl
trigger1 = statetype != A
;---------------------------------------------------------------------------
;Flareon Standing
[State -1, Stand Strong Punch]
type = Changestate
value = 210
triggerall = statetype != A ;&& var(25) <= 0
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = ctrl
trigger2 = (stateno = 200) && movecontact
trigger3 = (stateno = 215) && movecontact
trigger4 = (stateno = 300) && movecontact
trigger5 = (stateno = 315) && movecontact
;---------------------------------------------------------------------------
;Vaporeon Standing
[State -1, Stand Hard Punch]
type = Changestate
value = 209
triggerall = statetype != A ;&& var(25) <= 0
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = (stateno = [200,205]) && movecontact
trigger3 = (stateno = [215,220]) && movecontact
trigger4 = (stateno = [300,305]) && movecontact
trigger5 = (stateno = [315,320]) && movecontact
;---------------------------------------------------------------------------
;Summon
[State -1, Change]
type = ChangeState
value = 484
triggerall = command = "QCB_k1" && command != "holddown" ;&& var(25) <= 0
trigger1 = statetype = S && ctrl && numhelper(482) = 0
trigger2 = stateno = 200 &&  AnimElem = 2, >= 0
trigger3 = stateno = 205 &&  AnimElem = 4, >= 0
trigger4 = stateno = 215 &&  AnimElem = 2, >= 0
trigger5 = stateno = 220 &&  AnimElem = 3, >= 0
trigger6 = stateno = 225 &&  AnimElem = 6, >= 0
trigger7 = stateno = 300 &&  AnimElem = 2, >= 0
trigger8 = stateno = 305 &&  AnimElem = 4, >= 0
trigger9 = stateno = 315 &&  AnimElem = 2, >= 0
trigger10 = stateno = 320 && AnimElem = 3, >= 0
trigger11 = stateno = 325 && AnimElem = 4, >= 0
;---------------------------------------------------------------------------
;Leafeon Standing
[State -1, Stand Light Kick]
type = Changestate
value = 214
triggerall = command = "a" ;&& var(25) <= 0
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------
;Sylveon Standing
[State -1, Stand Medium Kick]
type = Changestate
value = 217
triggerall = command = "b" ;&& var(25) <= 0
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 200) && movecontact
trigger3 = (stateno = 215) && movecontact
trigger4 = (stateno = 300) && movecontact
trigger5 = (stateno = 315) && movecontact
;---------------------------------------------------------------------------
;Umbreon Standing
[State -1, Stand Hard Kick]
type = Changestate
value = 220
triggerall = command = "c" ;&& var(25) <= 0
triggerall = command = "holdback"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,220]) && movecontact
trigger3 = (stateno = [300,320]) && movecontact
;---------------------------------------------------------------------------
;Umbreon Standing
[State -1, Launch Hard Kick]
type = ChangeState
value = 220
triggerall = command = "c" && command != "holddown" ;&& var(25) <= 0
trigger1 = statetype = S && ctrl
trigger2 = stateno = 200 && MoveContact
trigger3 = stateno = 215 && MoveContact
trigger4 = stateno = 300 && MoveContact
trigger5 = stateno = 315 && MoveContact
trigger6 = stateno = 205 && MoveContact
trigger7 = stateno = 220 && MoveContact
trigger8 = stateno = 305 && MoveContact
trigger9 = stateno = 320 && MoveContact
trigger10 = stateno = 100
;---------------------------------------------------------------------------
;Taunt
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "start"
trigger1 = statetype != A && ctrl
;---------------------------------------------------------------------------
;Jolteon Crouching
[State -1, Crouching Light Punch]
type = Changestate
value = 309
triggerall = command = "x" && var(25) <= 0
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------
;Flareon Crouching
[State -1, Crouching Medium Punch]
type = Changestate
value = 310
triggerall = command = "y" && var(25) <= 0
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 200) && movecontact
trigger3 = (stateno = 215) && movecontact
trigger4 = (stateno = 300) && movecontact
trigger5 = (stateno = 315) && movecontact
;---------------------------------------------------------------------------
;Vaporeon Crouching
[State -1, Crouching Hard Punch]
type = Changestate
value = 305
triggerall = command = "z" && var(25) <= 0
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,205]) && movecontact
trigger3 = (stateno = [215,220]) && movecontact
trigger4 = (stateno = [300,305]) && movecontact
trigger5 = (stateno = [315,320]) && movecontact
;---------------------------------------------------------------------------
;Flareon Jumping 1
[State -1, Jump Light Punch]
type = Changestate
value = 407
triggerall = command = "x"
trigger1 = statetype = a
trigger1 = ctrl
trigger2 = (stateno = 415) && movecontact
;---------------------------------------------------------------------------
;Glaceon Jumping 1
[State -1, Jump Medium Punch]
type = Changestate
value = 408
triggerall = command = "y"
trigger1 = statetype = a
trigger1 = ctrl
trigger2 = (stateno = 400) && movecontact
trigger3 = (stateno = 415) && movecontact
trigger4 = (stateno = 420) && movecontact
;---------------------------------------------------------------------------
;Vaporeon Jumping 1
[State -1, Jump Hard Punch]
type = Changestate
value = 409
triggerall = command = "z"
trigger1 = statetype = a
trigger1 = ctrl
trigger2 = (stateno = 400) && movecontact
trigger3 = (stateno = 405) && movecontact
trigger4 = (stateno = 415) && movecontact
trigger5 = (stateno = 420) && movecontact
;---------------------------------------------------------------------------
;Flareon Jumping 2
[State -1, Jump Light Kick]
type = Changestate
value = 405
triggerall = command = "a"
trigger1 = statetype = a
trigger1 = ctrl
trigger2 = (stateno = 400) && movecontact
;---------------------------------------------------------------------------
;Glaceon Jumping 2
[State -1, Jump Medium Kick]
type = Changestate
value = 406
triggerall = command = "b"
trigger1 = statetype = a
trigger1 = ctrl
trigger2 = (stateno = 400) && movecontact
trigger3 = (stateno = 415) && movecontact
trigger4 = (stateno = 405) && movecontact
;---------------------------------------------------------------------------
; Vaporeon Jumping 2
[State -1, Jump Hard Kick]
type = Changestate
value = 410
triggerall = command = "c"
trigger1 = statetype = a
trigger1 = ctrl
trigger2 = (stateno = 400) && movecontact
trigger3 = (stateno = 405) && movecontact
trigger4 = (stateno = 415) && movecontact
trigger5 = (stateno = 420) && movecontact
;---------------------------------------------------------------------------
;Leafeon Crouching
[State -1, Crouching Light Kick]
type = Changestate
value = 306
triggerall = command = "a" && var(25) <= 0
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------
;Sylveon Crouching
[State -1, Crouching Medium Kick]
type = Changestate
value = 307
triggerall = command = "b" && var(25) <= 0
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 200) && movecontact
trigger3 = (stateno = 215) && movecontact
trigger4 = (stateno = 300) && movecontact
trigger5 = (stateno = 315) && movecontact
;---------------------------------------------------------------------------
;Umbreon Crouching
[State -1, Crouching Hard Kick]
type = Changestate
value = 308
triggerall = command = "c" && var(25) <= 0
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,205]) && movecontact
trigger3 = (stateno = [215,220]) && movecontact
trigger4 = (stateno = [300,305]) && movecontact
trigger5 = (stateno = [315,320]) && movecontact
;---------------------------------------------------------------------------
;Super Jump
[State -1, Super Jump]
type = ChangeState
value = 90
triggerall = command = "Super_Jump" ;&& ctrl
trigger1 = StateType = S
trigger1= ctrl
;---------------------------------------------------------------------------
;Recovery Roll 
[State -1, Recovery Roll]
type = VarSet
triggerall = command = "roll" && alive = 1
trigger1 = stateno = 5050 || stateno = 5071
v = 10
value = 1
;---------------------------------------------------------------------------
;Recovery Roll 
[State -1, R Roll]
type = ChangeState
value = 430
triggerall = Var(10) = 1
trigger1 = Pos Y >= 0 && Vel Y > 0
;---------------------------------------------------------------------------
[State -1, Activate AI]
type = VarSet
trigger1 = command = "CPU1"
trigger2 = command = "CPU2"
trigger3 = command = "CPU3"
trigger4 = command = "CPU4"
trigger5 = command = "CPU5"
trigger6 = command = "CPU6"
trigger7 = command = "CPU7"
trigger8 = command = "CPU8"
trigger9 = command = "CPU9"
trigger10 = command = "CPU10"
trigger11 = command = "CPU11"
trigger12 = command = "CPU12"
trigger13 = command = "CPU13"
trigger14 = command = "CPU14"
trigger15 = command = "CPU15"
trigger16 = command = "CPU16"
trigger17 = command = "CPU17"
trigger18 = command = "CPU18"
trigger19 = command = "CPU19"
trigger20 = command = "CPU20"
trigger21 = command = "CPU21"
trigger22 = command = "CPU22"
trigger23 = command = "CPU23"
trigger24 = command = "CPU24"
trigger25 = command = "CPU25"
trigger26 = command = "CPU26"
trigger27 = command = "CPU27"
trigger28 = command = "CPU28"
trigger29 = command = "CPU29"
trigger30 = command = "CPU30"
v = 59
value = 1

;- Defense -
[State -1] ;Stand Guard
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (p2movetype = A) && (ctrl)
trigger1 = (p2bodydist X <= 140) && (random <=699)
value = 130

[State -1] ;Crouch Guard
Triggerall = roundstate = 2
type = changestate
triggerall = (var(59) != 0) && (statetype = C) && (p2movetype = A) && (ctrl)
trigger1 = (p2bodydist X <= 140) && (random <=699)
value = 131

[State -1] ;Air Guard
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = A) && (p2movetype = A) && (ctrl)
trigger1 = (p2bodydist X <= 140) && (random <=699)
value = 132

;- Some Combos -
[State -1]
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (p2statetype != A) && (ctrl)
trigger1 = (p2bodydist X <= 5) && (random = [0,200]) && (p2movetype = I)
value = 200

[State -1]
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (p2statetype != A) && (ctrl)
trigger1 = (p2bodydist X <= 5) && (random = [201,400]) && (p2movetype = I)
value = 205

[State -1]
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (p2statetype != A) && (ctrl)
trigger1 = (p2bodydist X <= 5) && (random = [401,600]) && (p2movetype = I)
value = 210

[State -1]
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (p2statetype != A) && (ctrl)
trigger1 = (p2bodydist X <= 5) && (random = [601,800]) && (p2movetype = I)
value = 215

[State -1]
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (p2statetype != A) && (ctrl)
trigger1 = (p2bodydist X <= 5) && (random = [801,999]) && (p2movetype = I)
value = 220

[State -1]
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (p2statetype != A) && (ctrl)
trigger1 = (p2bodydist X <= 5) && (random = [801,999]) && (p2movetype = I)
value = 225

[State -1]
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (p2statetype != A) && (ctrl)
trigger1 = (p2bodydist X <= 5) && (random = [801,999]) && (p2movetype = I)
value = 229

;- More Combos -

;Combos AI
[State -1];Combo 1
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (stateno = 200)
trigger1 = (movecontact)
value = 205

[State -1];Combo 2
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) !=0) && (statetype = S)
trigger1 = (stateno = 205) && (prevstateno = 200) && (movecontact) ;&& (random = [0,300])
value = 210

[State -1];Combo 3
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) !=0) && (statetype = S)
trigger1 = (prevstateno = 210) && (movecontact) ;&& (random = [301,600])
value = 215

[State -1];Combo 4
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) !=0) && (statetype = S)
trigger1 = (movecontact) ;&& (random = [301,600])
value = 215

[State -1];Combo 5
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) !=0) && (statetype = S)
trigger1 = (prevstateno = 215) && (movecontact) ;&& (random = [301,600])
value = 220

[State -1];Combo 6
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) !=0) && (statetype = S)
trigger1 = (prevstateno = 220) && (movecontact) ;&& (random = [301,600])
value = 229

[State -1];Combo 7
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) !=0) && (statetype = S)
trigger1 = (p2bodydist X <= 10) && (random = [0,999]) && (p2movetype = I)
trigger1 = (prevstateno = 91) && (movecontact) ;&& (random = [301,600])
value = 400

[State -1];Combo 8
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) !=0) && (statetype = S)
trigger1 = (prevstateno = 400) && (movecontact) ;&& (random = [301,600])
value = 405

[State -1];Combo 9
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) !=0) && (statetype = S)
trigger1 = (prevstateno = 405) && (movecontact) ;&& (random = [301,600])
value = 410

;- AI Specials -

[State -1] ; Leafeon Leaf Boomerang
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (ctrl) && (random = [0, 200])
trigger1 = (P2bodydist X > 90) && (prevstateno != 5120)
value = 8300

[State -1]; Crouching HP
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = C) && (ctrl) && (random = [201, 400])
trigger1 = (P2bodydist X >= 70) && (prevstateno != 5120) && (p2movetype != H)
value = 310

[State -1]; Blank
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (ctrl) && (random = [401, 600])
trigger1 = (P2bodydist X <= 20) && (prevstateno != 5120) && (p2movetype != H)
value = 500

[State -1]; Blank
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (ctrl) && (random = [601, 800])
trigger1 = (P2bodydist X >= 20) && (prevstateno != 5120) && (p2movetype != H)
value = 501

[State -1]; Blank
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (ctrl) && (random = [801, 999])
trigger1 = (P2bodydist X <= 80) && (prevstateno != 5120) && (p2movetype != H)
value = 502

[State -1]; Jolteon Rush 
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (ctrl) && (random = [100, 400])
trigger1 = (P2bodydist X <= 10) && (prevstateno != 5120) && (p2movetype != H)
value = 502

[State -1]; Umbreon Flipping Jump (Weak)
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (ctrl) && (random = [100, 400])
trigger1 = (P2bodydist X <= 20) && (prevstateno != 5120) && (p2movetype != H)
value = 502

[State -1]; Umbreon Flipping Jump (Medium)
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (ctrl) && (random = [100, 400])
trigger1 = (P2bodydist X <= 20) && (prevstateno != 5120) && (p2movetype != H)
value = 502

[State -1]; Umbreon Flipping Jump (Hard)
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (ctrl) && (random = [100, 400])
trigger1 = (P2bodydist X <= 20) && (prevstateno != 5120) && (p2movetype != H)
value = 502
;- AI Hypers -

[State -1]; Armored Mewtwo
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (ctrl)
trigger1 = (p2bodydist X >= 160) && (power >= 3000) && (random = [0,333])
value = 1040

[State -1]; Vaporeon Hydro Pump
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (ctrl) && (p2statetype != A)
trigger1 = (p2bodydist X >= 150) && (power >= 1000) && (random = [334,666])
value = 1030

[State -1]; Mega Eevee Attack
type = changestate
Triggerall = roundstate = 2
triggerall = (var(59) != 0) && (statetype = S) && (p2statetype != A) && (ctrl)
trigger1 = (p2bodydist X <= 200) && (power >= 1000) && (random = [667,999])
value = 1000
